/*
 * Copyright (c) 2011 Jean-Marc Perronne
 * Ensisa, 12 rue des Freres Lumieres, F-68093 Mulhouse cedex
 * All rights reserved.
 *
 * The copyright of this software is owned by Werner Randelshofer. 
 * You may not use, copy or modify this software, except in  
 * accordance with the license agreement you entered into with  
 * Jean-Marc Perronne. For details see accompanying license terms. 
 */

package fr.uha.ensisa.jmp.drone.input.progressive;


public class DefaultInputAdapter implements InputAdapter
{
	@Override
	public float adaptLeftRight(float value)
	{
		value = _adaptLeftRight(value);
		if (value <-1 || value >1 || value==0) return 0;
		return value;
	}

	@Override
	public float adaptFrontBack(float value)
	{
		value = _adaptFrontBack(value);
		if (value <-1 || value >1) return 0;
		return value;
	}

	@Override
	public float adaptUpDown(float value)
	{
		value = _adaptUpDown(value);
		if (value <-1 || value >1 || value==0) return 0;
		return value;
	}

	@Override
	public float adaptRotateLeftRight(float value)
	{
		value = _adaptRotateLeftRight(value);;
		if (value <-1 || value >1 || value==0) return 0;
		return value;
	}

	protected float _adaptLeftRight(float value)
	{
		return value;
	}

	protected float _adaptFrontBack(float value)
	{
		return value;
	}

	protected float _adaptUpDown(float value)
	{
		return value;
	}

	protected float _adaptRotateLeftRight(float value)
	{
		return value;
	}
}
